package com.kyh.sys.entity;


import java.util.Date;

import javax.persistence.Table;

import com.kyh.annotation.Model;
import com.kyh.entity.base.BaseEntity;

/**
*/
@Table(name="sys_col", catalog="col_id")
public class Col extends BaseEntity<Col> {

	@Model(nameTable="colId")
	private Long colId; // 主键ID
	@Model(nameTable="menuId")
	private Long menuId; // 所属菜单ID
	@Model(nameTable="colType")
	private Integer colType; // 字段类型
	@Model(nameTable="colCode")
	private String colCode; // 字段编码
	@Model(nameTable="colName")
	private String colName; // 字段名称
	@Model(nameTable="colSortNo")
	private Integer colSortNo; // 字段显示序号
	@Model(nameTable="colStatusShow")
	private Integer colStatusShow; // 列表是否显示
	@Model(nameTable="colStatusAdd")
	private Integer colStatusAdd; // 是否新增
	@Model(nameTable="colStatusEdit")
	private Integer colStatusEdit; // 是否可编辑
	@Model(nameTable="colStatusValidate")
	private Integer colStatusValidate; // 编辑是否需验证
	@Model(nameTable="colStatusSearch")
	private Integer colStatusSearch; // 是否搜索
	@Model(nameTable="colValueOnload")
	private String colValueOnload; // 加载时的默认值
	@Model(nameTable="colSelectors")
	private String colSelectors; // 选择框值
	@Model(nameTable="colStatusListEdit")
	private Integer colStatusListEdit; // 列表是否可编辑，0否1是
	@Model(nameTable="colScripts")
	private String colScripts; // 字段脚本
	@Model(nameTable="urlSearch")
	private String urlSearch; // 搜索接口URL
	@Model(nameTable="fieldName")
	private String fieldName; // 选择框所需要的字段名，如A.menu_id AS dictKey,A.menu_name AS dictValue
	@Model(nameTable="placeholder")
	private String placeholder; // 提示文字
	@Model(nameTable="status")
	private Integer status; // 
	@Model(nameTable="createTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date createTime; // 
	@Model(nameTable="updateTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date updateTime; // 

	public Long getColId() {
		return colId;
	}
	public Col setColId(Long colId) {
		this.colId = colId;
		return this;
	}
	public Long getMenuId() {
		return menuId;
	}
	public Col setMenuId(Long menuId) {
		this.menuId = menuId;
		return this;
	}
	public Integer getColType() {
		return colType;
	}
	public Col setColType(Integer colType) {
		this.colType = colType;
		return this;
	}
	public String getColCode() {
		return colCode;
	}
	public Col setColCode(String colCode) {
		this.colCode = colCode;
		return this;
	}
	public String getColName() {
		return colName;
	}
	public Col setColName(String colName) {
		this.colName = colName;
		return this;
	}
	public Integer getColSortNo() {
		return colSortNo;
	}
	public Col setColSortNo(Integer colSortNo) {
		this.colSortNo = colSortNo;
		return this;
	}
	public Integer getColStatusShow() {
		return colStatusShow;
	}
	public Col setColStatusShow(Integer colStatusShow) {
		this.colStatusShow = colStatusShow;
		return this;
	}
	public Integer getColStatusAdd() {
		return colStatusAdd;
	}
	public Col setColStatusAdd(Integer colStatusAdd) {
		this.colStatusAdd = colStatusAdd;
		return this;
	}
	public Integer getColStatusEdit() {
		return colStatusEdit;
	}
	public Col setColStatusEdit(Integer colStatusEdit) {
		this.colStatusEdit = colStatusEdit;
		return this;
	}
	public Integer getColStatusValidate() {
		return colStatusValidate;
	}
	public Col setColStatusValidate(Integer colStatusValidate) {
		this.colStatusValidate = colStatusValidate;
		return this;
	}
	public Integer getColStatusSearch() {
		return colStatusSearch;
	}
	public Col setColStatusSearch(Integer colStatusSearch) {
		this.colStatusSearch = colStatusSearch;
		return this;
	}
	public String getColValueOnload() {
		return colValueOnload;
	}
	public Col setColValueOnload(String colValueOnload) {
		this.colValueOnload = colValueOnload;
		return this;
	}
	public String getColSelectors() {
		return colSelectors;
	}
	public Col setColSelectors(String colSelectors) {
		this.colSelectors = colSelectors;
		return this;
	}
	public Integer getColStatusListEdit() {
		return colStatusListEdit;
	}
	public Col setColStatusListEdit(Integer colStatusListEdit) {
		this.colStatusListEdit = colStatusListEdit;
		return this;
	}
	public String getColScripts() {
		return colScripts;
	}
	public Col setColScripts(String colScripts) {
		this.colScripts = colScripts;
		return this;
	}
	public String getUrlSearch() {
		return urlSearch;
	}
	public Col setUrlSearch(String urlSearch) {
		this.urlSearch = urlSearch;
		return this;
	}
	public String getFieldName() {
		return fieldName;
	}
	public Col setFieldName(String fieldName) {
		this.fieldName = fieldName;
		return this;
	}
	public String getPlaceholder() {
		return placeholder;
	}
	public Col setPlaceholder(String placeholder) {
		this.placeholder = placeholder;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public Col setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public Col setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public Col setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}
	
	public static Col col(
			Long menuId,
			Integer colType,
			String colCode,
			String colName,
			Integer colSortNo,
			Integer colStatusShow,
			Integer colStatusAdd,
			Integer colStatusEdit,
			Integer colStatusValidate,
			Integer colStatusSearch,
			String colValueOnload,
			String colSelectors,
			Integer colStatusListEdit,
			String colScripts,
			String urlSearch,
			String fieldName,
			String placeholder,
			Integer status
			) {
		Col entity = new Col();
		entity.setMenuId(menuId);
		entity.setColType(colType);
		entity.setColCode(colCode);
		entity.setColName(colName);
		entity.setColSortNo(colSortNo);
		entity.setColStatusShow(colStatusShow);
		entity.setColStatusAdd(colStatusAdd);
		entity.setColStatusEdit(colStatusEdit);
		entity.setColStatusValidate(colStatusValidate);
		entity.setColStatusSearch(colStatusSearch);
		entity.setColValueOnload(colValueOnload);
		entity.setColSelectors(colSelectors);
		entity.setColStatusListEdit(colStatusListEdit);
		entity.setColScripts(colScripts);
		entity.setUrlSearch(urlSearch);
		entity.setFieldName(fieldName);
		entity.setPlaceholder(placeholder);
		entity.setStatus(status);
		return entity;
	}
}